package com.lhz.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * The persistent class for the dingdan database table.
 * 
 */
@Entity
@NamedQuery(name="Dingdan.findAll", query="SELECT d FROM Dingdan d")
public class Dingdan implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="dingdan_id")
	private String dingdanId;

	private int deletebyback;

	private int deleter;

	private BigDecimal heji;

	private String number;

	private String remark;

	@Temporal(TemporalType.TIMESTAMP)
	private Date riqi;

	private int status;

	@Column(name="table_name")
	private String tableName;

	@Column(name="user_id")
	private String userId;

	@Column(name="user_type")
	private int userType;

	//bi-directional many-to-one association to Dingdandetail
	@OneToMany(mappedBy="dingdan",fetch=FetchType.EAGER)
	private List<Dingdandetail> dingdandetails;

	public Dingdan() {
	}

	public String getDingdanId() {
		return this.dingdanId;
	}

	public void setDingdanId(String dingdanId) {
		this.dingdanId = dingdanId;
	}

	public int getDeletebyback() {
		return this.deletebyback;
	}

	public void setDeletebyback(int deletebyback) {
		this.deletebyback = deletebyback;
	}

	public int getDeleter() {
		return this.deleter;
	}

	public void setDeleter(int deleter) {
		this.deleter = deleter;
	}

	public BigDecimal getHeji() {
		return this.heji;
	}

	public void setHeji(BigDecimal heji) {
		this.heji = heji;
	}

	public String getNumber() {
		return this.number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getRiqi() {
		return this.riqi;
	}

	public void setRiqi(Date riqi) {
		this.riqi = riqi;
	}

	public int getStatus() {
		return this.status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getTableName() {
		return this.tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public int getUserType() {
		return this.userType;
	}

	public void setUserType(int userType) {
		this.userType = userType;
	}

	public List<Dingdandetail> getDingdandetails() {
		return this.dingdandetails;
	}

	public void setDingdandetails(List<Dingdandetail> dingdandetails) {
		this.dingdandetails = dingdandetails;
	}

	public Dingdandetail addDingdandetail(Dingdandetail dingdandetail) {
		getDingdandetails().add(dingdandetail);
		dingdandetail.setDingdan(this);

		return dingdandetail;
	}

	public Dingdandetail removeDingdandetail(Dingdandetail dingdandetail) {
		getDingdandetails().remove(dingdandetail);
		dingdandetail.setDingdan(null);

		return dingdandetail;
	}

}